<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue中的set方法</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <!-- <div id="app">
        <div v-for="(item, key, index) in userInfo">
            {{index}}--{{key}}--{{item}}
        </div>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                userInfo: {
                    name: "Dell",
                    age: 28,
                    gendor: "male",
                    salary: "secret"
                }
            }
        })
    </script> -->


    <div id="app">
        <div v-for="item in userInfo">
            {{item}}
        </div>
    </div>

    <script>
        var vm = new Vue({
            el: "#app",
            data: {
                userInfo: [1, 2, 3, 4]
            }
        })
    </script>
</body>
</html>